package com.xml.dmo01;

import java.lang.reflect.Method;

public class AnnoDemo02 {
    public static void main(String[] args) throws Exception{
        Class<?> aClass = Class.forName("com.xml.dmo01.UseTest");
        UseTest o = (UseTest) aClass.newInstance();
        Method[] declaredMethods = aClass.getDeclaredMethods();
        for (Method declaredMethod : declaredMethods) {
            if (declaredMethod.isAnnotationPresent(Test.class)){
                System.out.println(o);
            }
        }
    }
}
